/**
 * Class Intent
 * This class is used to create intent the show/hide Page/Fragment
 * Example
 * 	var intent = new Intent("pageName");
 * 	intent.setExtras("key": "value");
 * 	intent.setAnimation("animation_name");
 * 	//or
 * 	intent.setAnimation(new Animation("animation_name", 100))
 */
Intent = (function(){
    /**
     * Intent constructor
     * @param name {String} Page or Fragment name
     * @constructor
     */
    function Intent(name){
        this.setName(name);
        this.extras = {};
    }
    /**
     * Set name of Page or Fragment class
     * @param name {String} Page/Fragment name
     */
    Intent.prototype.setName = function(name){
        this.name = name;
    };
    /**
     * Get name of Page or Fragment that we set before
     * @returns {String}
     */
    Intent.prototype.getName = function(){
        return this.name;
    };
    /**
     * Set Extra data that is used in Page or Fragment if we want to
     * send data from one Page/Fragment to other
     * @param key {String} Name of property
     * @param value {*} Data that we save
     * @returns {Intent} this intent
     */
    Intent.prototype.setExtras = function(key, value){
        this.extras[key] = value;
        return this;
    };
    /**
     * Get Extra data form intent
     * @param key {String} Name of data
     * @returns {*} data that we save in intent
     */
    Intent.prototype.getExtras = function(key){
        return this.extras[key];
    };
    /**
     * Set Animation that we want to show or hide Page/Fragment
     * @param animation {String|Animation} Animation name or Animation object
     * @returns {Intent} this intent
     */
    Intent.prototype.setAnimation = function(animation){
        this.animation = animation;
        return this;
    };
    /**
     * Get Animation form intent
     * @returns {String|Animation} animation in this intent
     */
    Intent.prototype.getAnimation = function(){
        return this.animation;
    };

    return Intent;

})();